package com.kim.bookshop.book.service;

import java.util.List;

import com.kim.bookshop.book.bean.Book;
import com.kim.bookshop.book.bean.PageBean;
import com.kim.bookshop.category.bean.Category;

public interface BookService {
	
	//获取热销
	public List<Book> getPopList();
	
	//检索书籍
	public PageBean<Book> searchBook(String bname);
	
	//库存
	public   List<Book>  getStack();
	
	//库存更新
	public void updateStock(String bid,int count);
	
	//清空库存
	public void cleanStock(String bid);
	
	//保存书籍
	public void save(Book book);
	
	//加载书籍信息
	public Book load(String bid);
	
	//重新上架
	public void reonline(String bid);
	
	//移除书籍
	public void remove(String bid);
	
	//更新书籍信息
	public void updateInfo(Book book);
	
	//获取系统所有书籍列表
	public List<Book> findAll();
	
	//分页获取
	public PageBean<Book> findAllPage(int pc,int ps);
	
	//获取下架书籍
	public  List<Book> findOffLine();
	
	//获取所有分类列表
	public List<Category> findCategorys();
	
	//获取分类下得书籍列表
	public List<Book> findByCategory(String cid);
	
	public PageBean<Book> findByCategoryPage(String cid,int pc,int ps);
}
